package com.fy.consumer.controller;

import com.fy.common.api.CommonResult;
import com.fy.common.api.OperationCode;
import com.fy.consumer.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/consumer/productOrder")
@Api(tags="消费者购买实物商品")
@RefreshScope
public class ConsumerProductOrderController {
    /**
     * 
     * @param productId 
     * @return com.fy.consumer.vo.ProductVo
     * @author Sun-qw
     * @date 2022/5/27 16:41
     */
    @ApiOperation("查询实物商品信息")
    @GetMapping(value = "/productOrderFindById")
    public CommonResult productOrderFindById(int productId)
    {
        ProductModelVo productModelVo = null;
        return CommonResult.success(productModelVo);
    }

    /**
     * 
     * @param addressVo
     * @return int
     * @author Sun-qw
     * @date 2022/5/27 16:43
     */
    @ApiOperation("添加address收货地址")
    @PostMapping(value = "/addAddress")
    public CommonResult addAddress(@RequestBody AddressVo addressVo)
    {
        return CommonResult.result(
                OperationCode.SUCCESS_CREATE_ADDRESS_80000.getCode(),OperationCode.SUCCESS_CREATE_ADDRESS_80000.getMessage());
    }

    /**
     *
     * @param consumerId
     * @return java.util.List<com.fy.consumer.vo.TravelerVo>
     * @author Sun-qw
     * @date 2022/5/27 16:53
     */
    @ApiOperation("查询address收货人")
    @GetMapping(value = "/FindAllAddressByConsumerId")
    public CommonResult findAllAddressByConsumerId(int consumerId)
    {
        List<AddressVo> addressVoList = null;
        return CommonResult.success(addressVoList);
    }

    /**
     * 
     * @param objectOrderVo 
     * @return com.fy.consumer.vo.ObjectOrderVo
     * @author Sun-qw
     * @date 2022/6/2 10:01
     */
    @ApiOperation("添加object_order实物订单信息")
    @PostMapping(value = "/addObjectOrder")
    public CommonResult addObjectOrder(@RequestBody ObjectOrderVo objectOrderVo)
    {
        return CommonResult.result(
        OperationCode.SUCCESS_CREATE_OBJECTORDER_81200.getCode(),OperationCode.SUCCESS_CREATE_OBJECTORDER_81200.getMessage());
    }

    /**
     * 
     * @param  
     * @return com.fasterxml.jackson.databind.util.JSONPObject
     * @author Sun-qw
     * @date 2022/5/25 19:01
     */
    @ApiOperation("查看object_order实物订单")
    @GetMapping(value = "/objectOrderFindById")
    public CommonResult objectOrderFindById(int objectOrderId)
    {
        ObjectOrderVo objectOrderVo = null;
        return CommonResult.success(objectOrderVo);
    }

    /**
     * 
     * @param consumerId
     * @return java.util.List<com.fy.consumer.vo.ObjectOrderVo>
     * @author Sun-qw
     * @date 2022/5/27 17:17
     */
    @ApiOperation("查看消费者全部object_order实物订单")
    @GetMapping(value = "/objectOrderFindByConsumerId")
    public CommonResult objectOrderFindByConsumerId(int consumerId)
    {
        List<ObjectOrderVo> objectOrderVoList = null;
        return CommonResult.success(objectOrderVoList);
    }

    /**
     * 
     * @param  
     * @return com.fasterxml.jackson.databind.util.JSONPObject
     * @author Sun-qw
     * @date 2022/5/25 19:01
     */
    @ApiOperation("查看门店实物")
    @GetMapping(value = "/findAllProduct")
    public CommonResult findAllTicket(int storeId)
    {
        List<ProductVo> productVoList = null;
        return CommonResult.success(productVoList);
    }
}
